package com.sky.mapper;

import com.sky.entity.SetmealDish;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealDishMapper {

    //根据菜品id查询套餐
    List<Long> getSetmealByDishId(List<Long> ids);

    //新增套餐的菜品
    void batchAdd(List<SetmealDish> setmealDishes);

    //删除套餐关联的菜品
    void delete(List<Long> ids);

    //根据套餐Id查询菜品
    @Select("select * from setmeal_dish where setmeal_id=#{setmealId};")
    List<SetmealDish> getDishBySetmealId(Long id);
}
